#include <iostream>
#include <math.h>
using namespace std;

int main() {
    int t;
    cin >> t;
    while(t--) {
        int sx, sy, ex, ey, n;
        string pos;
        cin >> sx >> sy >> ex >> ey;
        cin >> n >> pos;
        int dx = ex - sx;
        int dy = ey - sy;
        int gx = 0, gy = 0;
        for(int i = 0; i < n; ++i) {
            gx += pos[i] == 'L' ? -1 : (pos[i] == 'R' ? 1 : 0);
            gy += pos[i] == 'U' ? 1 : (pos[i] == 'D' ? -1 : 0);
        }
        if((abs(gx) >= n && dx != 0) || ((abs(gy) >= n && dy != 0))) cout << -1 << endl;
        else {
            int stepovertime = gx + gy + n;
            int times = (dx + dy) % stepovertime; 0
        }
    }
}